package com.thinkgem.jeesite.modules.euler.web;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.euler.entity.StatAccountLoginEntity;
import com.thinkgem.jeesite.modules.euler.entity.StatAccountSourceEntity;

/**
 * @describe:
 * @author leoZ E-mail: zhangle231@163.com
 * @version 上午10:30:25
 */
@Controller
@RequestMapping(value = "${adminPath}/euler/statAccout")
public class StatAccoutContorller extends BaseController {
	/*
	 * 登陆统计页
	 */
	@RequestMapping(value = {"statAccoutLogin", ""})
	public String statAccoutLogin(Model model) {
		logger.debug("enter statAccoutLogin");
		List<StatAccountLoginEntity>statAccountLoginEntityList = new ArrayList<StatAccountLoginEntity>();
		for (int i = 0; i < 31; i++) {
			StatAccountLoginEntity entity = new StatAccountLoginEntity();
			entity.setDate("2015-03-02");
			entity.setLoginSuccessUserCnt(i);
			entity.setLoginSuccessCnt(i);
			entity.setLoginCnt(i);
			entity.setLoginSuccessRatio(0.49434343f);
			statAccountLoginEntityList.add(entity);
		}
		model.addAttribute("statAccountLoginEntityList", statAccountLoginEntityList);
		List<StatAccountSourceEntity>StatAccountSourceEntityList = new ArrayList<StatAccountSourceEntity>();
		for (int i = 0; i < 31; i++) {
			StatAccountSourceEntity entity = new StatAccountSourceEntity();
			entity.setGameName("game" + i);
			entity.setGameCnt(i*10);
			StatAccountSourceEntityList.add(entity);
		}
		model.addAttribute("StatAccountSourceEntityList", StatAccountSourceEntityList);
		return "modules/euler/statAccoutLogin";
	}
}
